sumGrade = 0
sumScore = 0
num  = 0
while num < 5 : 
    s = input()
    sa = s.split(" ")
    score = float(sa[1])
    grade = float(sa[2])
    sumGrade = sumGrade + grade
    if  score>=90:
        sco = 4.0
    else:
        sco = 4.0 * score / 90
    sumScore = sumScore + sco * grade
    #print(score,sco,grade)
    num = num + 1

print("GPA:{:.2f}".format(sumScore/sumGrade))